package cn.edu.tju.fctl.service;

import cn.edu.tju.fctl.entities.*;
import cn.edu.tju.fctl.util.Evaluation;
import cn.edu.tju.fctl.util.VacationType;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * Created by liutong on 15/12/18.
 */
public interface IVacationService {

    LeaveInfo findById(int id);

    int updateLeave(LeaveInfo leaveInfo);

    int updateLeaveDelay(LeaveDelay leaveDelay);

    int createLeave(LeaveInfo leaveInfo);

    List<LeaveInfo> findAllVacationByUserID(int userID);

    List<LeaveLog> findVacationLogByID(int id);

    int addVacationToDelay(LeaveDelay leaveDelay);

    LeaveDelay findDelayVacation(int delay_id);

    //
    List<LeaveInfo> findAllVacationByApproverID(int userId, int page, int num);

    //statics info?

    List<VacationType> findFirstVacationType();

    List<VacationType> findSecondVacationType(int type1Id);

    List<LeaveInfo> findVacationByUserIDAndDate(int userId, Date fromDate, Date  toDate);

    Evaluation getEvaluation(int userId, int fromYear, int fromMonth, int toYear, int toMonth);

    List<Evaluation> getDepartmentEvaluation(int departId, int fromYear, int fromMonth, int toYear, int toMonth);

    List<VacationView> getVacationView();
}
